package com.wx.rabbitmq.controller;

import com.wx.rabbitmq.entity.Order;
import com.wx.rabbitmq.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author wx
 * @Description: 订单Controller
 * @date 2018/12/3 000317:24
 */
@RestController
public class OrderController {
    @Autowired
    private OrderService orderService;
    
    /**
     * @description: 下单测试
     * @author: wx
     * @date: 2018/12/3 0003
     * @param order
     * @return: java.lang.String
     */
    @PostMapping("/createOrder")
    public String createOrder(@RequestBody Order order) {
        orderService.createOrder(order);
        return "下单成功";
    }

}
